<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AddColumnAuthTypeToKmsClients extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('kms_clients', function (Blueprint $table) {
            $table->unsignedInteger("authType")->default(0)->comment("授权类型 1 - 全员可见 2 - 部分可见")->after("childType");
            $table->unsignedInteger("versionId")->default(0)->comment("应用当前版本id")->after("authType");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('kms_clients', function (Blueprint $table) {
            $table->dropColumn('authType');
            $table->dropColumn('versionId');
        });
    }
}
